-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New pickit property skin
#1421
base: master
Are you sure you want to change the base?
New pickit property skin
#1421
Conversation
d2bs/kolbot/libs/NTItemAlias.dbl
Outdated
// small charms | ||
NTIPAliasSkin["brown"] = "cm11"; | ||
NTIPAliasSkin["bear"] = "cm12"; NTIPAliasSkin["bearfoot"] = "cm12"; | ||
NTIPAliasSkin["m"] = "cm13"; NTIPAliasSkin["M"] = "cm13"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalized aliases are unnecessary as they are lower cased in the parser anyways.
d2bs/kolbot/libs/NTItemAlias.dbl
Outdated
NTIPAliasSkin["tower"] = "cm23"; | ||
// grand charms | ||
NTIPAliasSkin["eye"] = "cm31"; | ||
NTIPAliasSkin["dna"] = "cm32"; NTIPAliasSkin["DNA"] = "cm32"; NTIPAliasSkin["spaghetti"] = "cm32"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalized aliases are unnecessary as they are lower cased in the parser anyways.
can you change skinCode to getSkinCode() |
Defining a property with a |
Sure, but that is at runtime - changing it to a get function makes it’s clear statically that it is not a property of the object, and follows convention with getColor. |
@@ -1039,6 +1039,158 @@ Unit.prototype.getColor = function () { | |||
return -1; | |||
}; | |||
|
|||
Object.defineProperty(Unit.prototype, "skinCode", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to getSkinCode() to match existing kolbot convention (eg getColor)
I understand what your saying, but there are loads of these kinds of "calculated" values in kolton and d2bs already. Stuff that isnt settable, but retrievable as an variable on the unit object, like: Those are all already on the item unit, why can't skinCode be one of them? skinCode seems to make sense to be also one of these variables. |
…, jewels and charms skin. Refactored getting the skin value of item with property `skinCode` in Unit prototype.
The main difference is those are done by d2bs or are extremely trivial, this is a change in kolbot so it should follow kolbot convention for similar functions (like getColor). |
Prototype.js, NTItemAlias.dbl, NTItemParser.dbl
Skin
for pickit to filter rings, amulets, jewels and charms skin.GameAction.js, MuleLogger.js, Misc.js
skinCode
in Unit prototype.Possible skin values are based on these :
Rings :
coral
orchain
smallblue
orsloop
bigblue
orbband
orangestone
ororangering
crown
oreturn
Amulets :
dot
orcross
sun
penta
orstar
Jewels :
pink
blue
orange
orpeach
green
red
white
Small charms :
brown
orfootball
bear
orbearfoot
orbearclaw
m
orcoin
Large charms :
paw
orpaper
horn
tower
orobelisk
Grand charms :
eye
dna
orlace
orspaghetti
dragon
ormonster
Usage :
You can specify the skin without item to be identified. This means that the skin property goes the same way as type, name or quality.
In your pickit :
If by mistake you specify a skin that does not exist for the item type, this item will NOT be kept.
For example
[type] == ring && [quality] == unique && [skin] == orange # [ItemAllSkills] > 0
It will NOT take any soj or bk because
orange
skin does not exist for rings.